version 10
set more off
clear matrix
clear
capture log close
set mem 700m


**************************************************************************
***CREATING FILE FOR TABLES 2,3,4,5,6
**************************************************************************
use crime_table3.dta, clear
sort unsplit_cadre_code year
save, replace

use gsdp_unsplit_90s.dta, clear
drop if (statenum==5|statenum==11|statenum==27) & year<=1999
rename statenum unsplit_cadre_code
sort unsplit_cadre_code year
save temp6.dta, replace

use state_codes_my.dta, clear
sort statename
save, replace

use state_cmchange_al.dta, clear
egen temp=mean(cmpartychange), by(unsplit_cadre_code year)
replace cmpartychange=temp if cmpartychange==. & cmchange!=.
drop temp
sort unsplit_cadre_code year
save temp1.dta, replace

use electionyears_long.dta, clear
capture drop unsplit_cadre_code
gen unsplit_cadre_code = cadre_code
replace unsplit_cadre_code=4 if unsplit_cadre_code==11 & year<2000
replace unsplit_cadre_code=14 if unsplit_cadre_code==5 & year<2000
replace unsplit_cadre_code=26 if unsplit_cadre_code==27 & year<2000
keep if year>=1980
sort unsplit_cadre_code year
save temp2.dta, replace

use state_seatshare.dta, clear
gen unsplit_cadre_code=statenum
sort unsplit_cadre_code year
keep unsplit_cadre_code year presidents_rule cm_party_name
save temp3.dta, replace



use replication_transfer.dta, clear

gen unsplit_cadre_code = cadre_code
replace unsplit_cadre_code=4 if unsplit_cadre_code==11 & year<2000
replace unsplit_cadre_code=14 if unsplit_cadre_code==5 & year<2000
replace unsplit_cadre_code=26 if unsplit_cadre_code==27 & year<2000

sort unsplit_cadre_code year
merge unsplit_cadre_code year using temp1.dta
tab _merge
keep if _merge==3 /**note: right now dropping Meghalaya CM changes**/
drop _merge

sort unsplit_cadre_code year
merge unsplit_cadre_code year using temp2.dta
tab _merge
keep if _merge==3
drop _merge

sort unsplit_cadre_code year
merge unsplit_cadre_code year using temp3.dta
tab _merge
keep if _merge==3 /***note: dropping Meghalaya shares***/
drop _merge

sort year_allot identifier
merge year_allot identifier using replication_ranks.dta
tab _merge
drop _merge

sort year_allot identifier
merge year_allot identifier using replication_training.dta
tab _merge
tab cadre if _merge==1
tab cadre if _merge==2
keep if _merge==1|_merge==3
drop _merge

sort unsplit_cadre_code year
merge unsplit_cadre_code year using crime_table3.dta
tab _merge
drop if _merge==2
drop _merge

sort unsplit_cadre_code year
merge unsplit_cadre_code year using temp6.dta
tab _merge

drop _merge


/***setting cmchange to default***/
replace cmchange=0 if presidents_rule==1 

/***VARIABLE FOR YEARS OF EXPERIENCE***/
gen year_exp = (year - year_allot)/10
replace year_exp = . if year_exp<0
gen year_exp_sq = year_exp^2

/***DUMMY VARIABLE FOR GENDER***/
tab gender
gen gendum=0
replace gendum=1 if gender=="FEMALE"

/***DUMMY VARIABLES FOR SOURCE OF RECRUITMENT***/
tab recruit_code
gen directdum=0
replace directdum=1 if recruit_code=="RR"

/****Changing scale of length of tenure***/
replace sltenure=sltenure/12
label var sltenure "Years in previous post"

/***generating interactions***/
gen cmchange_home=homestate1*cmchange
gen cmchange_exp=cmchange*year_exp
gen cmchange_gen = cmchange*gendum

label var cmchange_home "New CM* Home state officer"
label var cmchange_exp "New CM* Experience"
label var cmchange_gen "New CM* Female"

/***generating center-state-district dummies***/

sort cadre identifier year
replace scsd = scsd[_n-1] if (scsd==.|scsd==0) & year!=1980
replace scsd=. if year<year_allot
/***assigning those with <4 year_exp to district level***/
replace scsd=4 if scsd==0 & year_exp<=0.4
gen centerpost = (scsd==1|scsd==2)
replace centerpost=. if scsd==.
gen statepost=(scsd==3|scsd==5)
replace statepost=. if scsd==.
gen distpost=(scsd==4)
replace distpost=. if scsd==.

/***Making promotion vs lateral transfer dummies***/
sort cadre identifier year 
gen trans_promo=transdum*(slev>slev[_n-1]|(centerpost==1 & statepost[_n-1]==1))
replace trans_promo=. if year==1980
replace trans_promo=. if transdum==.
label var trans_promo "Promotion transfer"

sort cadre identifier year 
gen trans_lat=transdum*(1-trans_promo)
replace trans_lat=. if year==1980
replace trans_lat=. if transdum==.
label var trans_lat "Lateral transfer"

foreach var of varlist orank10 orank20 orank30 oprank10 oprank20 oprank30 {

gen cm_`var'=cmchange*`var'

}

/*creating dummies for types of transfers: transfer to same type of job (good-good, bad-bad) and transfer to a different quality of job (bad-good, good-bad) */

sort cadre identifier year
gen trtype1=0 if transdum==0
bys cadre identifier: replace trtype1=1 if transdum==1 & simp1ias==simp1ias[_n-1] 

gen trtype2=0 if transdum==0
bys cadre identifier: replace trtype2=1 if transdum==1 & simp1ias==simp1ias[_n-1] 
bys cadre identifier: replace trtype2=3 if transdum==1 & simp1ias==1 & simp1ias[_n-1]==0 
bys cadre identifier: replace trtype2=4 if transdum==1 & simp1ias==0 & simp1ias[_n-1]==1 

replace trtype1=2 if trtype2==3|trtype2==4
drop trtype2

label var trtype1 "Transfer type based on IAS ranking(0,1,2)"
tab trtype1, gen(trtype1dum)
label var trtype1dum2 "Transfer into post of similar importance"
label var trtype1dum3 "Transfer into post of different importance"

keep if year>=1980


/***political and control vars for regressions***/
gen cmnopartychange=(cmchange==1 & cmpartychange==0)
gen cmelec=(cmchange==1 & selecdum==1)
gen cmnoelec=(cmchange==1 & selecdum==0)
gen gsdpcons_unsplitsc = gsdpcons_unsplit/1000000

drop if cadre_code==10 /***dropping Jammu & Kashmir***/
keep if year_allot<=2000
gen base=1 if directdum==1

gen temp=1 if transdum~=.
egen meanimp1=mean(simp1ias*temp), by(cadre identifier)
drop temp

*****labeling all vars
label var year_allot "Year of recruitment"
label var gendum  "Female"
label var homestate1  "Home state dummy" 
label var orank10  "Top 10 rank in cohort"
label var orank20  "Top 20 rank in cohort"
label var orank30  "Top 30 rank in cohort"
label var wks_training  "Total weeks of training"
label var wks_foreign  "Weeks of foreign training"
label var empanel_dum  "Empanelment dummy"
label var transdum  "Transfer dummy"
label var scolldum  "Transfer to collector post"
label var simp1ias  "Important post dummy"
label var trtype1dum2  "Transfer to post of similar importance"
label var trtype1dum3  "Transfer to post of different importance"
label var year "Year"
label var cmchange  "New CM dummy"
label var selecdum  "State election year"
label var gelecdum  "General election year"
label var year_exp  "years of experience (*1/10)"
label var year_exp_sq "Years of experience (*1/10)-squared"
label var identifier  "Officer Identifier (anonymized)"
label var cadre_code  "State code"
label var crime_pop  "Total crimes per 1000 pop"
label var riot_pop  "Riots per 1000 pop"
label var gsdpcons_unsplitsc  "Gross state domestic product per capita"
label var base  "Base sample"
label var directdum "Direct recruit" 
label var cmpartychange "New CM, new party" 
label var cmnopartychange  "New CM, no new party"
label var cmelec  "New CM after election"
label var cmnoelec  "New CM, no election"
label var trans_promo  "Transfer with promotion"
label var trans_lat "Lateral transfer"
label var cm_orank10  "New CM*top 10 rank in cohort"
label var cm_orank20  "New CM*top 20 rank in cohort"
label var cm_orank30  "New CM*top 30 rank in cohort"
label var cm_oprank20  "New CM*top 20 percentile rank in cohort"
label var cmchange_home  "New CM*home state dummy"
label var cmchange_exp  "New CM*years of experience"
label var cmchange_gen  "New CM*female"
label var meanimp1  "Mean importance of posts over career"

save table2.dta, replace


******************************************************************
*********CREATIGN FILE FOR CASTE REGRESSIONS IN TABLE 6
*******************************************************************
use table2.dta, clear
/****keeping only UP-UT officers and merging with caste data***/
keep if cadre_code==26|cadre_code==27
sort cadre_code identifier 
merge cadre_code identifier using replication_caste.dta
tab _merge 
keep if _merge==1|_merge==3
drop _merge

sort cadre_code year
merge cadre_code year using up_ut_cmcaste.dta
tab _merge
keep if _merge==1|_merge==3
drop _merge

/****generating dummies for whether officer is same caste as CM�s party base*******/
replace caste2= "SC" if caste2== "SC "
replace caste2= "OBC" if caste2== "BC"
gen cmoffsamecaste2=(caste2==partycaste)
replace cmoffsamecaste2=1 if caste2=="OBC" & partycaste =="BC, Muslim"
replace cmoffsamecaste2=1 if caste2=="BC" & partycaste =="BC, Muslim"
replace cmoffsamecaste2=1 if caste2=="Muslim" & partycaste =="BC, Muslim"
replace cmoffsamecaste2=1 if caste2=="SC" & partycaste=="SC, UC"
replace cmoffsamecaste2=1 if caste2=="UC" & partycaste =="SC, UC"
replace cmoffsamecaste2=1 if caste2=="Jain" & partycaste =="UC"
replace cmoffsamecaste2=1 if caste2=="Jain" & partycaste =="SC, UC"
replace cmoffsamecaste2=. if caste2==""|partycaste==""
replace cmoffsamecaste2=. if caste2=="Christian"|caste2=="ST"
label var cmoffsamecaste2 "Officer belongs to caste base of CM party"

/****interaction with CMchange***/
gen cmchange_samecaste2=cmchange*cmoffsamecaste2
label var cmchange_samecaste2 "New CM*Officer belongs to caste base of CM party"
save table6_caste.dta, replace


****************************************************************
****Data files for Table 7
***************************************************************
use dist_1988_2004_1991match_jun2008.dta, clear
sort dist2004_colspell
save temp1.dta, replace

use state_cmchange_al.dta, clear
rename unsplit_cadre_code state
drop if state==10|state==.
drop if cadre_code==5 & year<2000
drop if cadre_code==11 & year<2000
drop if cadre_code==27 & year<2000
sort state year
save temp2.dta, replace

use electionyears_long.dta
rename cadre_code state
drop if state>28
drop if state==2| state==6| state==16| state==17| state==18| state==19| state==23| state==25|state==10
drop if year<1980|year>2004
drop if state==5 & year<2000
drop if state==11 & year<2000
drop if state==27 & year<2000
sort state year
save temp3.dta, replace 

use c:\asha\bureaucracy\data\election\dist_elecvars_jun2008.dta
drop seatshare lag
sort dist1988 year
save temp4.dta, replace

use distcollector_yearwise_transfer.dta, clear
drop if district== ""
rename district dist2004_colspell
sort dist2004_colspell
merge dist2004_colspell using temp1.dta
tab _merge
keep if _merge==3
drop _merge

/***dropping new districts which were carved out of multiple old ones***/
drop if dist2004_colspell=="Gautam Budh Ngr"
drop if dist2004_colspell=="Patan"
drop if dist2004_colspell=="Kawardha"
drop if dist2004_colspell=="Fatehgarh Sahib"
drop if dist2004_colspell=="Hathras"

/****aggregating transfers (means) to 1988 district means***/
replace state=4 if state==11 & year<2000
replace state=14 if state==5 & year<2000
replace state=26 if state==27 & year<2000

collapse (mean) state transdum, by(dist1988 year)

/****dropping Jammu & Kashmir****/
drop if state==10

/***dropping one odd district: Hardwar + Saharanpur which is split across UP and UT***/
drop if state==26.5
save distcollector_yearwise_1988.dta, replace

sort state year
merge state year using temp2.dta
tab _merge
drop _merge
sort state year
merge state year using temp3.dta
tab _merge
drop _merge 

/*****merging with the AC-level election variables****/
sort  dist1988 year
merge dist1988 year using temp4.dta
tab _merge
keep if _merge==3 /***we lose Uttaranchal (8 districts) + Calcutta ***/
drop _merge

gen newcm_mlacm_sameparty = cmchange*MLA_CM_sameparty
gen newcm_polturn= cmchange*pol_turn
gen cmnopartychange=(cmchange==1 & cmpartychange==0)
gen cmparty_mlacm= cmpartychange*MLA_CM_sameparty
gen cmnoparty_mlacm= cmnopartychange*MLA_CM_sameparty

label var cmnopartychange "New CM, no new party"
label var cmpartychange "New CM, new party"
label var cmparty_mlacm "New CM, new party * % MLAs from CM party"
label var cmnoparty_mlacm "New CM, no new party * % MLAs from CM party"
drop if presidents_rule==1
drop if year<1985

keep transdum cmchange selecdum gelecdum dist1988 state year cmpartychange cmnopartychange newcm_mlacm_sameparty MLA_CM_sameparty cmparty_mlacm cmnoparty_mlacm newcm_polturn pol_turn 
xi i.year
save table7.dta, replace


****************************************************************
****Data files for Table 8
***************************************************************

*****DISTRICT COLELCTOR TRANSFERS + IMMUNIZATIONS

use dist_immun_2001.dta, clear
drop if state==.
replace district="Gautam Budh Ngr" if district=="Gautam Buddha Nagar" 
replace district="Shrawasti" if district=="Shravasti" 
gen dist2004_colspell=district
gen statenum=state
sort statenum dist2004_colspell
save immun_temp.dta, replace

use dist_1988_2004_1991match_jun2008.dta, clear
drop if statenum==10
sort statenum dist2004_colspell
merge statenum dist2004_colspell using immun_temp.dta
tab _merge
keep if _merge==3
drop _merge

replace dist1988="Aurangabad (BH)" if dist1988=="Aurangabad"&statenum==4
replace dist1988="Bilaspur (CG)" if dist1988=="Bilaspur"&statenum==5
replace dist1988="Bilaspur (HP)" if dist1988=="Bilaspur"&statenum==9
replace dist1988="Hamirpur (HP)" if dist1988=="Hamirpur"&statenum==9
replace dist1988="Aurangabad (MH)" if dist1988=="Aurangabad"&statenum==15
replace dist1988="Hamirpur (UP)" if dist1988=="Hamirpur"&statenum==26

collapse complete_immunizations, by(dist1988)
sort dist1988
save immun_temp.dta, replace

use state_cmchange_al.dta, clear
sort unsplit_cadre_code year
save, replace

use distcollector_yearwise_1988.dta, clear
gen unsplit_cadre_code=state
replace unsplit_cadre_code=4 if unsplit_cadre_code==11 & year<2000
replace unsplit_cadre_code=14 if unsplit_cadre_code==5 & year<2000
replace unsplit_cadre_code=26 if unsplit_cadre_code==27 & year<2000
keep state unsplit_cadre_code year dist1988 transdum 
replace dist1988="Aurangabad (BH)" if dist1988=="Aurangabad"&state==4
replace dist1988="Bilaspur (CG)" if dist1988=="Bilaspur"&state==5
replace dist1988="Bilaspur (HP)" if dist1988=="Bilaspur"&state==9
replace dist1988="Hamirpur (HP)" if dist1988=="Hamirpur"&state==9
replace dist1988="Aurangabad (MH)" if dist1988=="Aurangabad"&state==15
replace dist1988="Hamirpur (UP)" if dist1988=="Hamirpur"&state==26

sort unsplit_cadre_code year
merge unsplit_cadre_code year using state_cmchange_al.dta, nokeep
tab _merge
keep if _merge==3
drop _merge

sort dist1988
merge dist1988 using immun_temp.dta
tab _merge
keep if _merge==3
drop _merge
drop if state==10

/***Gen mean transfers between 1995-2000 and 1991-2000***/
 sort dist1988 year
gen dum_95_00 = 1 if year>= 1995&year<=2000
egen transdum_95 = mean(transdum*dum_95_00), by(dist1988)

/***Politically induced and non-political transfers***/
egen trans_cmchange_95 = mean(transdum*cmchange*dum_95_00), by(dist1988)
egen trans_nocmchange_95 = mean(transdum*(1-cmchange)*dum_95_00), by(dist1988)
replace complete_immunizations= complete_immunizations/100

/***labeling all vars****/
label var complete_immunizations "Complete immunization 2001"
label var transdum_95 "Collector transfers 1995-2000"
label var trans_cmchange_95 "CM-based collector transfers 1995-2000"
label var trans_nocmchange_95 "Non CM-based collector transfers 1995-2000"

keep complete_immunizations trans_cmchange_95 trans_nocmchange_95  dist1988 state year
save table8a.dta, replace

***********district collector transfers and road project completion
use state_cmchange_al.dta, clear
gen state = unsplit_cadre_code
sort state year
save temp1.dta, replace

use distcollector_yearwise_1988.dta, clear
replace state=4 if state==11 & year<2000
replace state=14 if state==5 & year<2000
replace state=26 if state==27 & year<2000
sort state year
merge state year using temp1.dta
tab _merge
keep if _merge==3
drop _merge
drop if year<2000|year>2004

/***Gen mean transfers between 2000-2004***/
egen transdum_2004 = mean(transdum), by(dist1988)

/***Transfers due/not due to cmchange dummies***/
egen trans_cmchange_04 = mean(transdum*cmchange), by(dist1988)
egen trans_nocmchange_04 = mean(transdum*(1-cmchange)), by(dist1988)
keep if year==2004 
keep dist1988 transdum_2004 trans_cmchange_04 trans_nocmchange_04
sort dist1988
save temp2.dta, replace

use road_stata.dta, clear 
rename year fiscal_year
gen year=2000 if fiscal_year=="2000-2001"
replace year=2001 if fiscal_year=="2001-2002"
replace year=2002 if fiscal_year=="2002-2003"
replace year=2003 if fiscal_year=="2003-2004"
replace year=2004 if fiscal_year=="2004-2005"
replace year=2005 if fiscal_year=="2005-2006"
destring year, replace
gen statenum=state
gen  dist2004_colspell=district
drop if statenum==10

replace dist2004_colspell="Ambedkar Nagar" if dist2004_colspell=="Ambedkarnagar"
replace dist2004_colspell="Bangalore" if dist2004_colspell=="Bangalore U"
replace dist2004_colspell="Bangalore Rural" if dist2004_colspell=="Bangalore R"
replace dist2004_colspell="Chidambaranar(Toothukudi)" if dist2004_colspell=="Tuticorin"
replace dist2004_colspell="Dakshin Kannada" if dist2004_colspell=="Dakshina Kannada"
replace dist2004_colspell="Gautam Budh Ngr" if dist2004_colspell=="G.B. Nagar"
replace dist2004_colspell="Jyotiba Phule Nagar" if dist2004_colspell=="J.B.F.Nagar"
replace dist2004_colspell="Sant Kabir Nagar" if dist2004_colspell=="S.K. Nagar"
replace dist2004_colspell="Shrawasti" if dist2004_colspell=="Shravasti"
sort dist2004_colspell year
save roads_temp.dta, replace

use dist_1988_2004_1991match_jun2008.dta, clear
drop if statenum==10
sort dist2004_colspell
merge dist2004_colspell using roads_temp.dta
tab _merge
keep if _merge==3
drop _merge

/***generating road completion vars****/
egen t1=rsum(newlgth_sanction upgrade_sanction)
egen t2=rsum(newlgth_completed upgrade_completed)
collapse statenum t1 t2 totexp_lakhs amountcleared_lakhs, by(dist1988 year)
gen roadcomplete=t2/t1
gen roadcompletedum=(roadcomplete==1)
replace roadcompletedum=. if roadcomplete==.

/***merging with district collector file****/
sort dist1988 
merge dist1988 using temp2.dta
tab _merge
keep if _merge==3
drop _merge
keep roadcompletedum trans_cmchange_04 trans_nocmchange_04 statenum year dist1988
label var roadcompletedum "Completion of road project dummy"
label var trans_cmchange_04 "Mean political transfers in last 5 years"
label var trans_nocmchange_04 "Mean other transfers in last 5 years"
save table8b.dta, replace



************district collectors and poverty rates

/***Merge with cmchange to classify collector transfers***/
use state_cmchange_al.dta, clear
sort unsplit_cadre_code year
drop if cadre_code==5 & year<2000
drop if cadre_code==11 & year<2000
drop if cadre_code==27 & year<2000
save temp1.dta, replace

use petia_poverty_inequality.dta, clear
gen year = .
replace year=1983 if round==38
replace year=1987 if round==43
replace year=1993 if round==50
replace year=1999 if round==55
keep if sector==1
rename districtname dist1988 
replace dist1988="Bilaspur (CG)" if dist1988=="Bilaspur" & statename=="Madhya Pradesh"
replace dist1988="Bilaspur (HP)" if dist1988=="Bilaspur" & statename=="Himachal Pradesh"
replace dist1988="Aurangabad (MH)" if dist1988=="Aurangabad" & statename=="Maharashtra"
replace dist1988="Aurangabad (BH)" if dist1988=="Aurangabad" & statename=="Bihar"
replace dist1988="Hamirpur (UP)" if dist1988=="Hamirpur" & statename=="Uttar Pradesh"
replace dist1988="Hamirpur (HP)" if dist1988=="Hamirpur" & statename=="Himachal Pradesh"
sort dist1988 year
save poverty_temp.dta, replace

use distcollector_yearwise_1988.dta, clear
sort dist1988 year
merge dist1988 year using poverty_temp.dta
tab _merge
tab dist1988 if _merge==2
drop if _merge==2
drop _merge
gen unsplit_cadre_code=state
replace unsplit_cadre_code=4 if unsplit_cadre_code==11 & year<2000
replace unsplit_cadre_code=14 if unsplit_cadre_code==5 & year<2000
replace unsplit_cadre_code=26 if unsplit_cadre_code==27 & year<2000
sort unsplit_cadre_code year
merge unsplit_cadre_code year using temp1.dta
tab _merge /***unmerged are Meghalaya and J&K (merge=2) ***/
keep if _merge==3
drop _merge
drop if dist1988=="Hardwar + Saharanpur" 

/***Gen 5 year averages to match petia rounds***/
sort dist1988 year
gen dum_99 = 1 if year>= 1993&year<1999
egen transdum_1999 = mean(transdum*dum_99), by(dist1988)
gen dum_allyrs=1 if year>=1987&year<1999
egen transdum_allyrs = mean(transdum*dum_allyrs), by(dist1988)

/***Transfers due/not due to cmchange dummies***/
egen trans_cmchange_99 = mean(transdum*cmchange*dum_99), by(dist1988)
egen trans_nocmchange_99 = mean(transdum*(1-cmchange)*dum_99), by(dist1988)
egen trans_cmchange_allyrs = mean(transdum*cmchange*dum_allyrs), by(dist1988)
egen trans_nocmchange_allyrs = mean(transdum*(1-cmchange)*dum_allyrs), by(dist1988)

/****initial poverty levels***/
gen temp=inpov if year==1987
replace temp=. if inpov==0 & year==1987
egen inpov1987=mean(temp), by(dist1988)
drop temp
gen temp=inpov if year==1993
replace temp=. if inpov==0 & year==1993
egen inpov1993=mean(temp), by(dist1988)
drop temp
gen temp=inpov if year==1999
replace temp=. if inpov==0 & year==1999
egen inpov1999=mean(temp), by(dist1988)
drop temp

/***Change in poverty between rounds***/
gen povrate_change_1993 = inpov1993-inpov1987
gen povrate_change_1999 = inpov1999-inpov1993
gen povrate_change_allyrs = inpov1999-inpov1987
gen check=povrate_change_1993 + povrate_change_1999
drop if state==10
rename unsplit_cadre_code uscc

/***labeling everything***/
label var povrate_change_1999 "Change in poverty 1993-99"
label var povrate_change_allyrs "Change in poverty 1987-99"
label var transdum_1999 "Probability of collector transfer 1993-98"
label var transdum_allyrs "Probability of collector transfer 1987-98"
label var trans_cmchange_99 "Probability of CM-induced collector transfer 1993-98"
label var trans_cmchange_allyrs "Probability of CM-induced collector transfer 1987-98"
label var trans_nocmchange_99 "Probability of other collector transfer 1993-98"
label var trans_nocmchange_allyrs "Probability of other collector transfer 1987-98"

keep povrate_change_1999 trans_cmchange_99 trans_nocmchange_99 inpov1993 uscc year check povrate_change_allyrs trans_cmchange_allyrs trans_nocmchange_allyrs inpov1987 
save table8c.dta, replace

